import {Callout} from "nextra/components";

# CLI

Forui includes a CLI that generates themes and styles in your project. These themes and styles can be directly modified
to fit your design needs. No additional installation is required. Neither does the CLI increase your application's
bundle size.

## init

Use the `init` command to create `forui.yaml` and `main.dart` files in your project's directory.

```shell copy
dart run forui init
```

```shell copy
Usage: forui init
-h, --help     Print this usage information.
-f, --force    Overwrite existing files if they exist.
```

## snippet

### create

Use the `snippet create` command to generate a code snippet in your project. The snippets are generated in `lib` by default.

```shell copy
dart run forui snippet create [snippets]
```

```shell copy
Usage: forui snippet create [snippets]
-h, --help      Print this usage information.
-f, --force     Overwrite existing files if they exist.
-o, --output    The output directory or file, relative to the project directory.
                (defaults to "lib")
```

### ls

Use the `snippet ls` command to list all available snippets.

```shell copy
dart run forui snippet ls
```

```shell copy
Usage: forui snippet ls
-h, --help    Print this usage information.
```

## style

### create

Use the `style create` command to generate a style in your project. The styles are generated in `lib/theme` by default.

<Callout type="info">
    See the [docs](themes#customization) on how to use the generated styles.
</Callout>

```shell copy
dart run forui style create [styles]
```

```shell copy
Usage: forui style create [styles]
-h, --help      Print this usage information.
-a, --all       Create all styles.
-f, --force     Overwrite existing files if they exist.
-o, --output    The output directory or file, relative to the project directory.
                (defaults to "lib/theme")
```

### ls

Use the `style ls` command to list all available styles.

```shell copy
dart run forui style ls
```

```shell copy
Usage: forui style ls
-h, --help    Print this usage information.
```

## theme

### create

Use the `theme create` command to generate a theme in your project. The theme is generated in `lib/theme/theme.dart` by
default.

<Callout type="info">
    See the [docs](themes#customization) on how to use the generated theme.
</Callout>

```shell copy
dart run forui theme create [theme]
```

```shell copy
Usage: forui theme create [theme]
-h, --help      Print this usage information.
-f, --force     Overwrite existing files if they exist.
-o, --output    The output directory or file, relative to the project directory.
                (defaults to "lib/theme/theme.dart")
```

### ls

Use the `theme ls` command to list all available themes.

```shell copy
dart run forui theme ls
```

```shell copy
Usage: forui theme ls
-h, --help    Print this usage information.
```
